]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Remove now-unused version_tag, clean up other code as well
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 29 Mar 2012 10:32:30 +0000 (06:32 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 25 May 2012 22:25:51 +0000 (18:25 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=676837

browser-plugin/browser-plugin.c
js/ui/extensionSystem.js
js/ui/shellDBus.js

index 7f4cad87198d305daedb75908ce5e18a8d9c6daa..2676beb22dc635fd0645abcceaec677278cb8cc2 100644 (file)
@@ -41,7 +41,7 @@
       "It can be used only by extensions.gnome.org"
 #define PLUGIN_MIME_STRING "application/x-gnome-shell-integration::Gnome Shell Integration Dummy Content-Type";
 
-#define PLUGIN_API_VERSION 3
+#define PLUGIN_API_VERSION 4
 
 typedef struct {
   GDBusProxy *proxy;
@@ -548,11 +548,9 @@ plugin_enable_extension (PluginObject *obj,
 
 static gboolean
 plugin_install_extension (PluginObject *obj,
-                          NPString      uuid,
-                          NPString      version_tag)
+                          NPString      uuid)
 {
   gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
-  gchar *version_tag_str;
 
   if (!uuid_is_valid (uuid_str))
     {
@@ -560,14 +558,9 @@ plugin_install_extension (PluginObject *obj,
       return FALSE;
     }
 
-  version_tag_str = g_strndup (version_tag.UTF8Characters,
-                               version_tag.UTF8Length);
-
   g_dbus_proxy_call (obj->proxy,
                      "InstallRemoteExtension",
-                     g_variant_new ("(ss)",
-                                    uuid_str,
-                                    version_tag_str),
+                     g_variant_new ("(s)", uuid_str),
                      G_DBUS_CALL_FLAGS_NONE,
                      -1, /* timeout */
                      NULL, /* cancellable */
@@ -575,7 +568,6 @@ plugin_install_extension (PluginObject *obj,
                      NULL /* user_data */);
 
   g_free (uuid_str);
-  g_free (version_tag_str);
 
   return TRUE;
 }
@@ -804,11 +796,9 @@ plugin_object_invoke (NPObject        *npobj,
   else if (name == install_extension_id)
     {
       if (!NPVARIANT_IS_STRING(args[0])) return FALSE;
-      if (!NPVARIANT_IS_STRING(args[1])) return FALSE;
 
       return plugin_install_extension (obj,
-                                       NPVARIANT_TO_STRING(args[0]),
-                                       NPVARIANT_TO_STRING(args[1]));
+                                       NPVARIANT_TO_STRING(args[0]));
     }
   else if (name == uninstall_extension_id)
     {
index fe092d2a0d29b4a51e31aa65084b1a8e5feeffee..abd9551c03b3ebfaf38a5697f73d6c0ae3400d75 100644 (file)
@@ -69,18 +69,16 @@ const disconnect = Lang.bind(_signals, _signals.disconnect);
 
 const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
 
-function installExtensionFromUUID(uuid, version_tag) {
+function installExtensionFromUUID(uuid) {
     let params = { uuid: uuid,
-                   version_tag: version_tag,
-                   shell_version: Config.PACKAGE_VERSION,
-                   api_version: API_VERSION.toString() };
+                   shell_version: Config.PACKAGE_VERSION };
 
     let message = Soup.form_request_new_from_hash('GET', REPOSITORY_URL_INFO, params);
 
     _httpSession.queue_message(message,
                                function(session, message) {
                                    let info = JSON.parse(message.response_body.data);
-                                   let dialog = new InstallExtensionDialog(uuid, version_tag, info.name);
+                                   let dialog = new InstallExtensionDialog(uuid, info.name);
                                    dialog.open(global.get_current_time());
                                });
 }
@@ -389,11 +387,10 @@ const InstallExtensionDialog = new Lang.Class({
     Name: 'InstallExtensionDialog',
     Extends: ModalDialog.ModalDialog,
 
-    _init: function(uuid, version_tag, name) {
+    _init: function(uuid, name) {
         this.parent({ styleClass: 'extension-dialog' });
 
         this._uuid = uuid;
-        this._version_tag = version_tag;
         this._name = name;
 
         this.setButtons([{ label: _("Cancel"),
@@ -434,9 +431,7 @@ const InstallExtensionDialog = new Lang.Class({
 
         _signals.emit('extension-state-changed', state);
 
-        let params = { version_tag: this._version_tag,
-                       shell_version: Config.PACKAGE_VERSION,
-                       api_version: API_VERSION.toString() };
+        let params = { shell_version: Config.PACKAGE_VERSION };
 
         let url = REPOSITORY_URL_DOWNLOAD.format(this._uuid);
         let message = Soup.form_request_new_from_hash('GET', url, params);
index 0921d7cef395ff4885b438fb2af245df0245b251..66e5dfb8758c89b4e65a8f5854a66665c7bb3311 100644 (file)
@@ -58,7 +58,6 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
 </method>
 <method name="InstallRemoteExtension">
     <arg type="s" direction="in" name="uuid"/>
-    <arg type="s" direction="in" name="version"/>
 </method>
 <method name="UninstallExtension">
     <arg type="s" direction="in" name="uuid"/>
@@ -254,8 +253,8 @@ const GnomeShell = new Lang.Class({
         return extension.errors;
     },
 
-    InstallRemoteExtension: function(uuid, version_tag) {
-        ExtensionSystem.installExtensionFromUUID(uuid, version_tag);
+    InstallRemoteExtension: function(uuid) {
+        ExtensionSystem.installExtensionFromUUID(uuid);
     },
 
     UninstallExtension: function(uuid) {